<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>瀑布流</title>
<script src="js.js"></script>
<style type="text/css">
*{ margin:0; padding:0;}
#container{ position:relative;}
.box{ padding:5px; float:left;}
.box_img{ padding:5px; border:#ccc 1px solid; box-shadow:0 0 5px #ccc; border-radius:5px;}
.box_img img{ width:150px; height:auto;}
</style>
</head>

<body>
<div id="container">
<script type="text/javascript">
for(var n=1; n<=2;n++){
    for (var i = 1; i<=30; i++) {
        document.write("<div class='box'><div class='box_img'><img src='image/"+i+".jpg'/></div></div>")
    }
}
</script>
</div>
</body>
</html>
